/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package model;

import java.io.Serializable;
import javax.persistence.AttributeOverride;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 *
 * @author robson
 */

@Entity
@Table(name="endereco")
public class Endereco implements Serializable{
    
    @Id
    @Column(name = "id_endereco", nullable = false)
    @SequenceGenerator(name = "seq_endereco", sequenceName = "endereco_id_endereco_seq")
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "seq_endereco")
    private long enderecoId;
    
    @Column(name="id_bairro")
    private long bairroId;
    
    @Column
    private String logradouro;
    
    @Column
    private String complemento;
    
    @Column
    private int cep;

    public Endereco(long enderecoId, long bairroId, String logradouro, String complemento, int cep) {
        this.enderecoId = enderecoId;
        this.bairroId = bairroId;
        this.logradouro = logradouro;
        this.complemento = complemento;
        this.cep = cep;
    }

    public Endereco() {
    }

    public long getEnderecoId() {
        return enderecoId;
    }

    public void setEnderecoId(long enderecoId) {
        this.enderecoId = enderecoId;
    }

    public String getLogradouro() {
        return logradouro;
    }

    public void setLogradouro(String logradouro) {
        this.logradouro = logradouro;
    }

    public String getComplemento() {
        return complemento;
    }

    public long getBairroId() {
        return bairroId;
    }

    public void setBairroId(long bairroId) {
        this.bairroId = bairroId;
    }

    public void setComplemento(String complemento) {
        this.complemento = complemento;
    }

    public int getCep() {
        return cep;
    }

    public void setCep(int cep) {
        this.cep = cep;
    }
    
}
